package io.kiki.stack.netty.invoker;

import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

/**
 * RejectedExecutionPolicy determines how to deal with this situation that user executor rejected the {@link RpcCallbackListener.CallbackTask}.
 */

@Slf4j
//@Setter
@Getter
public enum RejectedExecutionPolicy {
    /* discard the callback task */
    DISCARD, /* caller runs the callback in IO-thread */
    CALLER_RUNS, /* caller handle the task with exception strategy user provided */
    CALLER_HANDLE_EXCEPTION
}
